package com.jsh.erp.api;

import com.jsh.erp.datasource.entities.DepotHead;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;
import java.util.List;

@FeignClient(name = "jsh-system", path = "/jshERP-boot/api", contextId = "DepotHeadRemoteClient")
public interface DepotHeadRemoteClient {

    @GetMapping("/depotHead/getDepotHead")
    public DepotHead getDepotHead(@RequestParam("number") String number) throws Exception;

    @GetMapping("/depotHead/getDeportHeadListByAccountIds")
    List<DepotHead> getDepotHeadListByAccountIds(@RequestParam("accountIds") String[] accountIds);

    //  注意
    @GetMapping("/depotHead/getAccountSum")
    public BigDecimal getAccountSum(@RequestParam("id") Long id,
                                    @RequestParam("timeStr") String timeStr,
                                    @RequestParam("type") String type)throws Exception;

    //  注意
    @GetMapping("/depotHead/getManyAccountSum")
    public BigDecimal getManyAccountSum(@RequestParam("id") Long id,
                                        @RequestParam("timeStr") String timeStr,
                                        @RequestParam("type") String type)throws Exception;


}
